/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package br.com.sokoban.view;

import br.com.sokoban.controller.SokobanController;
import br.com.sokoban.elements.interfaces.MapCharacters;
import br.com.sokoban.stages.controller.Board;
import java.util.ArrayList;

/**
 *
 * @author kevinstortz
 */
public class StageSokoban extends javax.swing.JInternalFrame {
    
    private int valorFase;
    private ArrayList<MapCharacters> mapa;
    private Board board;
    private SokobanController sc;
    
     /**
     * Creates new form StageSokoban
     */
    public StageSokoban(int valorFase) {
        
        board = new Board(valorFase);
        mapa = board.getWorld();
        sc = new SokobanController(mapa, valorFase, this);
        paintComponents(board.geraMapas(mapa));
        initComponents();
        setTitle("Fase " + valorFase);
        setSize(600, 500);
        setVisible(true);
        this.valorFase = valorFase;
                
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        setClosable(true);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 394, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 278, Short.MAX_VALUE)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents


    // Variables declaration - do not modify//GEN-BEGIN:variables
    // End of variables declaration//GEN-END:variables
}
